<?php
	$obj=new Post();
	$menu = new Menu();
	$list = array();
	$menu->travel($menuid,$list);
	$data = $obj->getTable(" WHERE NewsTypeID in ('".implode("','",$list)."') AND Detail <> '' ORDER BY `post`.`LastUpdate` DESC");
	$paging=true;
	$display=10;
	
	/*******Start Paging*****************************/
	$page = $_GET['page'];				
	$limit = $display; 
	$total = count($data); 
	// work out the pager values 
	$pager  = Pager::getPagerData($total, $limit, $page); 
	$offset = $pager->offset; 
	$limit  = $pager->limit; 
	$page   = $pager->page;
	/*******Break paging*******************************/
	$item=$data[$offset];
?>

        	<label><?php echo $objMenu->MenuName?></label>
            <div class="line_title"><img src="images/ico_line.jpg" /></div>
            <div class="support_page">
<?php
	foreach($data as $item)
	//for($i=$offset;$i<$offset+$limit && count($data[$i])>0;$i++)
	{
		//$item=$data[$i];
?> 
            	<label><?php echo $item['Title'.$lang]?></label>
                <div>
                	<?php if($item['Image'] !=""){?>
                    <img class="thumb_support" src="<?php echo $img->resizePNG("news/4/post.jpg",220,220)?>" />
                    
                    <?php }?>
                   
                	<?php if($item['ImagePath'] != ""){?>
                    <img class="thumb_support" src="<?php echo $img->resizePNG($item['ImagePath'],220,220)?>" />
                    
                    <?php }?>
                    <p>
                    	<?php echo $item['Detail'.$lang]?>
                    </p>
                </div>
           		<div class="line_title"><img src="images/ico_line.jpg" /></div>
<?php
	}
?>
            </div>
